package com.school.demo.model.auto;

import io.swagger.annotations.ApiModelProperty;

import java.util.Map;

/**
 * @program: demo
 * @description: 文章评论返回类
 * @author: Charlotte
 * @create: 2021-03-24 16:30
 **/
public class ResultComment {
    @ApiModelProperty(value = "ID")
    private Integer id;
    @ApiModelProperty(value = "上级ID")
    private Map<Integer,ReplyComment> children;
    @ApiModelProperty(value = "用户")
    private User user;
    @ApiModelProperty(value = "文章ID")
    private Integer newsId;
    @ApiModelProperty(value = "内容")
    private String content;
    @ApiModelProperty(value = "创建时间")
    private Long createdTime;
    @ApiModelProperty(value = "状态，-1：删除，0：正常，2：神评")
    private Integer status;

    public ResultComment(Comment comment) {
        this.id = comment.getId();
        this.newsId = comment.getNewsId();
        this.content = comment.getContent();
        this.createdTime = comment.getCreatedTime();
        this.status = comment.getStatus();
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Map<Integer, ReplyComment> getChildren() {
        return children;
    }

    public void setChildren(Map<Integer, ReplyComment> children) {
        this.children = children;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Integer getNewsId() {
        return newsId;
    }

    public void setNewsId(Integer newsId) {
        this.newsId = newsId;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Long getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(Long createdTime) {
        this.createdTime = createdTime;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }
}
